import { createApp } from 'vue'
import './style/mystyle.css'
import App from './App.vue'
import { createPinia } from 'pinia'
import VueMarkdownEditor from '@kangc/v-md-editor';
import router from '../src/router'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import VMdEditor from '@kangc/v-md-editor';
import '@kangc/v-md-editor/lib/style/base-editor.css';
import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js';
import '@kangc/v-md-editor/lib/theme/style/vuepress.css';

// Prism
import Prism from 'prismjs';
// highlight code
import 'prismjs/components/prism-json';

VMdEditor.use(vuepressTheme, {
    Prism,
});

VueMarkdownEditor.use(vuepressTheme, {
    Prism,
});



const app = createApp(App)

app.use(VMdEditor);

app.use(VueMarkdownEditor);

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}




const pinia = createPinia() // 创建 Pinia 实例

app.use(pinia)
// 注册路由
app.use(router)


app.mount('#app')





